<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - 哈尔滨双城区农产品物流园管理系统</title>
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    <link rel="stylesheet" th:href="@{/css/style.css}">
    <style>
        .bg-image {
            background-image: url('https://source.unsplash.com/random/1920x1080/?agriculture,farm,warehouse');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            opacity: 0.7;
            z-index: -1;
        }
        
        .bg-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.4);
            z-index: -1;
        }
    </style>
</head>
<body>
    <div class="bg-image"></div>
    <div class="bg-overlay"></div>
    
    <div class="login-container">
        <div class="login-box">
            <div class="login-header">
                <div class="login-logo">
                    <i class="fas fa-leaf"></i>
                </div>
                <h3 class="login-title">哈尔滨双城区农产品物流园管理系统</h3>
                <p class="text-muted">请输入您的账号和密码</p>
            </div>
            
            <div class="alert alert-danger" role="alert" th:if="${param.error}" id="errorMessage">
                用户名或密码错误
            </div>
            
            <form class="login-form" th:action="@{/login}" method="post">
                <!-- CSRF令牌 -->
                <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
                
                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-prepend">
                            <span class="input-group-text">
                                <i class="fas fa-user"></i>
                            </span>
                        </div>
                        <input type="text" class="form-control" id="username" name="username" placeholder="用户名" required>
                    </div>
                </div>
                
                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-prepend">
                            <span class="input-group-text">
                                <i class="fas fa-lock"></i>
                            </span>
                        </div>
                        <input type="password" class="form-control" id="password" name="password" placeholder="密码" required>
                    </div>
                </div>
                
                <div class="form-group custom-control custom-checkbox">
                    <input type="checkbox" class="custom-control-input" id="remember-me" name="remember-me">
                    <label class="custom-control-label" for="remember-me">记住我</label>
                </div>
                
                <div class="form-group">
                    <button type="submit" class="btn btn-primary btn-block login-button">
                        <i class="fas fa-sign-in-alt mr-2"></i> 登录
                    </button>
                </div>
            </form>
            
            <div class="login-footer">
                <p class="mb-2">推荐使用浏览器: Chrome、Firefox、Edge</p>
                <p>&copy; 2025 哈尔滨双城区农产品物流园管理系统</p>
            </div>
        </div>
    </div>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/popper.js/1.16.1/umd/popper.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.min.js"></script>
</body>
</html> 